package cn.gcjxsc.common.consts;

/**
 * @author pumbaa
 * @since 1.0
 */
public enum OrderDiscr {
    SHOPPING_ORDER(1, "购物订单"), RECHARGE_ORDER(2, "商户冲值");

    private int type;
    private String desc;

    OrderDiscr(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static OrderDiscr fromCode(int type) {
        if (type == 1) {
            return SHOPPING_ORDER;
        } else {
            return RECHARGE_ORDER;
        }
    }
}
